package at.codejedi.sto.model.combat;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import org.hibernate.annotations.GenericGenerator;

@Entity
public class CombatLogFile {

	private List<Entry> entries;

	private String uuid;

	@OneToMany
	@Cascade(CascadeType.ALL)
	public List<Entry> getEntries() {
		return entries;
	}

	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name = "uuid", unique = true)
	public String getUuid() {
		return uuid;
	}

	public void setEntries(List<Entry> entries) {
		this.entries = entries;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}
}
